package com.yyw.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yyw.bean.Word;

@Mapper
public interface WordDao {

    int updateWord(Word word);

    int deleteWord(@Param("id") Long id);

    /**
     * 保存一个单词
     *
     * @param word
     * @return
     */
    int saveWord(Word word);

    /**
     * 获取单词，按照创建时间降序
     *
     * @return
     */
    List<Word> getWords();

}
